(#1471): base64-encode included SVGs to avoid mis-escaped characters
authorFederico Mena Quintero <federico@gnome.org>
Tue, 27 Nov 2018 18:13:31 +0000 (12:13 -0600)
committerFederico Mena Quintero <federico@gnome.org>
Tue, 27 Nov 2018 19:57:21 +0000 (13:57 -0600)
commite5f9bf2e9b85764ec22926be3532ef1b53ed8408
tree8c13a2f3983c83a4bd29f465692eb96c3cae3c81
parent0be4d3121716180ef1bed2eda89bd81c3a5e760e
(#1471): base64-encode included SVGs to avoid mis-escaped characters

We wrap SVG data from icons within another SVG with extra styling
information.  The wrapped SVG may contain characters that cannot be
part of a data: URL (https://fetch.spec.whatwg.org/#data-urls).

Librsvg 2.45 got more strict in its parsing of data: URLs; whereas
previously it ignored '#' characters in them, now it considers them to
be the start of a fragment identifier, which is not allowed in data:
URLs anyway.

To avoid unallowed characters, we now create a data: URL with a
base-64 encoded SVG.

Fixes https://gitlab.gnome.org/GNOME/gtk/issues/1471
gtk/gtkicontheme.c
gtk/tools/gdkpixbufutils.c